<div class="console-sub-title">
  参数设置
</div>

<ul id="mytab" class="nav nav-tabs">
  <li class="active"><a href="#defaultConf" data-toggle="tab">默认配置</a></li>
  <li><a href="#userSuperLikeConf" data-toggle="tab">用户superLike配置</a></li>
</ul>

<div class="tab-content" style="margin-top: 20px">
  <div class="tab-pane active" id="defaultConf">
    <div class="row">
      <div class="col-md-6">
        <div class="panel panel-default">
          <div class="panel-heading clearfix" style="line-height: 31px;">
            广告轮播
            <button class="btn btn-sm btn-danger pull-right" ng-click="changeSetting()">设置</button>
          </div>
          <div class="panel-body" style="min-height: 320px;">
            <div class="row mb10">
              <div class="col-md-8 text-center"><h4>修改</h4></div>
              <div class="col-md-4 text-center"><h4>当前</h4></div>
            </div>
            <div class="row lh40">
              <div class="col-md-8">
                <div class="col-md-6 minw105 text-right">SuperLike次数上限：</div>
                <div class="col-md-6">
                  <input class="form-control dib" type="number" ng-model="updateObj.superlike"/>
                </div>
              </div>
              <div class="col-md-4 text-center" ng-bind="oldSetting.superlike+'次'"></div>
            </div>
            <div class="row lh40">
              <div class="col-md-8">
                <div class="col-md-6 minw105 text-right">
                  推荐队伍数上限：
                </div>
                <div class="col-md-6">
                  <input class="form-control dib" type="number" ng-model="updateObj.groupNum"/>
                </div>
              </div>
              <div class="col-md-4 text-center" ng-bind="oldSetting.groupNum+'队'"></div>
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>

  <div class="tab-pane" id="userSuperLikeConf">
    <div class="console-sub-title">
      用户superLike次数配置
      <div data-g-loading-tip data-g-is-loading="isLoading" data-g-is-successed="isSuccessed"></div>
    </div>
    <p style="color: red">备注：如果在下面列表没有对应的用户的superlike次数，这些用户则使用默认次数的配置</p>
    <div class="form-inline search-con">
      <div class="form-group">
        <select class="form-control" ng-model="searchParams.key">
          <option value="identify">ID</option>
          <option value="nickName">昵称</option>
          <option value="phone">手机</option>
          <!--<option value="age">年龄</option>-->
        </select>
      </div>
      <div class="form-group">
        <input type="text" class="form-control" placeholder="输入关键字"
               ng-model="searchParams.val">
      </div>

      <button type="button" class="btn btn-default" ng-click="searchUserSuperLikeConfig()">筛选</button>
      <button type="button" class="btn btn-default" ng-click="resetUserSuperLikeConfig()">重置</button>
    </div>

    <div class="form-inline clearfix" style="margin-bottom: 10px;">
      <button type="button" class="btn btn-default pull-right" data-toggle="modal" data-target="#UserSuperLike-dialog">
        新建
      </button>
      <button type="button" class="btn btn-danger pull-right" ng-click="deleteUserSuperLikeConfig()">删除</button>
    </div>

    <div ui-grid="userSuperLikeGridOptions" ui-grid-selection ui-grid-pagination class="grid" style="height:400px;"></div>


    <div class="modal " id="UserSuperLike-dialog" tabindex="-1" role="dialog">
      <div class="modal-dialog">
        <div class="modal-content">
          <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-label="Close">
              <span aria-hidden="true">&times;</span>
            </button>
            <h4 class="modal-title" ng-bind="(userSuperLikeConfig.id?'编辑':'新建')+'用户superLike配置'"></h4>
            <div data-g-loading-tip data-g-is-loading="isLoading" data-g-is-successed="isSuccessed"></div>
          </div>
          <form class="form-horizontal" ng-submit="saveUserSuperLikeConfig()">
            <div class="modal-body">
              <div ng-show="!userSuperLikeConfig.id">
                  在添加用户时，用户Id和电话，两项填写其中一项即可
              </div>
              <div class="form-group">
                <label for="identify" class="col-md-2 control-label">用户Id：</label>{{userSuperLikeConfig.user.identify}}
                <div class="col-md-10"  ng-show="!userSuperLikeConfig.id">
                  <input type="text" class="form-control" id="identify" placeholder="用户Id号" ng-model="userSuperLikeConfig.user.identify"
                         >
                </div>
              </div>
              <div class="form-group"  ng-show="!userSuperLikeConfig.id">
                <label for="phone" class="col-md-2 control-label">用户电话：</label>
                <div class="col-md-10">
                  <input type="text" class="form-control" id="phone" placeholder="电话号码" ng-model="userSuperLikeConfig.user.phone"
                         >
                </div>
              </div>
              <div class="form-group">
                <label for="count" class="col-md-2 control-label">superLike次数：</label>
                <div class="col-md-10">
                  <input type="number" class="form-control" id="count" placeholder="superlike次数" ng-model="userSuperLikeConfig.times"
                         required>
                </div>
              </div>

              <div class="modal-footer">
                <button type="submit" class="btn btn-danger" ng-bind="userSuperLikeConfig.id?'修改':'新建'"></button>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
              </div>

            </div>
          </form>
        </div>
      </div>
    </div>



  </div>



</div>
